package com.app.oasystem.entity;

import com.baomidou.mybatisplus.annotation.IdType;


import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * @author 86+
 * @data 2021-04-13
 */

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Leaves implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 申请人名称
     */
    @TableField("applyName")
    private String applyName;

    /**
     * 审批人ID
     */
    @TableField("approveId")
    private Integer approveId;

    @TableField("beginTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginTime;

    @TableField("endTime")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date endTime;

    private Integer days;

    private String reason;

    /**
     * 0未审批1通过2拒绝
     */
    @TableField("isAgreed")
    private Integer isAgreed;

    @TableField(exist = false)
    private Integer userId;

}
